package answer;

/**
 * 定义一个图形的抽象类，
 * 具有求面积和画图形的方法，
 * 再定义点、线、圆的类继承这个抽象类实现它的方法。
 * 跟22题解题思路相似
 */

public class Answer23 {
	public static void main(String[] args) {
		Points p = new Points();
		Line l = new Line();
		Round r = new Round();
	}
}
abstract class Shape{
	public abstract String area(String name);
	public abstract String draw(String name);
}

class Points extends Shape{
	
	@Override
	public String area(String name) {
		return name;
	}
	
	@Override
	public String draw(String name) {
		return name;
	}
}

class Line extends Shape{
	
	@Override
	public String area(String name) {
		return name;
	}
	
	@Override
	public String draw(String name) {
		return name;
	}
}

class Round extends Shape{
	
	@Override
	public String area(String name) {
		return name;
	}
	
	@Override
	public String draw(String name) {
		return name;
	}
}